package com.craftplay.model;

import com.craftplay.VO.CommentVO;

import java.util.Date;
import java.util.List;

public class Unit {
    private Integer id;

    private Integer userId;

    private Integer kind;

    private String title;

    private String content;

    private String image;

    private Double latitude;

    private Double longitude;

    private String name;

    private String address;

    private String scope;

    private Integer form;

    private Integer leastCourseNum;

    private Integer leastPrice;

    private Integer price;

    private Integer maxPerson;

    private String date;

    private Integer timeLen;

    private String tool;

    private Integer youngOrOld;

    private Integer joinNum;

    private Integer isPublic;

    private String tel;

    private String addr;

    private String traffic;

    private Date createdTime;

    private Date updateTime;

    private int anonymous;

    private int focusSee;

    private int paySee;

    private double payMoney;

    private int typeId; //1图片，2视频，3语音

    private String coverUrl;//背景图URL

    private String fileId;//腾讯云id

    private String mediaUrl;//音频URL

    private int viewNum = 0;

    private int parentId = -1;

    private int mediaLength; //媒体长度

    private int isRead = 0; //媒体长度

    private Integer classType; //课程类型

    private String classTreeType; //教学方式 逗号隔开

    private String classMoney;//收费价格  逗号隔开

    //以下字段为后期返回JSON添加字段

    private Integer sex;

    private String headImgUrl;

    private String userName;

    //增加活动是否过期字段
    private int status;

    //是否支付
    boolean isPay;

    //未读评论数量
    private int notReadComment;

    //请教的用户
    private Integer askUserId;

    public Integer getAskUserId() {
        return askUserId;
    }

    public void setAskUserId(Integer askUserId) {
        this.askUserId = askUserId;
    }

    //评论
    List<CommentVO> commentVOList;


    List<Unit> replyList;

    //喜欢人数
    int loveNum;

    //是否已经喜欢
    boolean isLove;

    //是否已经关注
    boolean isFocus;

    //关注人数
    int focusNum;

    //==================================================


    public Integer getClassType() {
        return classType;
    }

    public void setClassType(Integer classType) {
        this.classType = classType;
    }

    public String getClassTreeType() {
        return classTreeType;
    }

    public void setClassTreeType(String classTreeType) {
        this.classTreeType = classTreeType;
    }

    public String getClassMoney() {
        return classMoney;
    }

    public void setClassMoney(String classMoney) {
        this.classMoney = classMoney;
    }

    public int getIsRead() {
        return isRead;
    }

    public void setIsRead(int isRead) {
        this.isRead = isRead;
    }

    public boolean isLove() {
        return isLove;
    }

    public void setLove(boolean love) {
        isLove = love;
    }

    public boolean isFocus() {
        return isFocus;
    }

    public void setFocus(boolean focus) {
        isFocus = focus;
    }

    public int getLoveNum() {
        return loveNum;
    }

    public void setLoveNum(int loveNum) {
        this.loveNum = loveNum;
    }

    public int getFocusNum() {
        return focusNum;
    }

    public void setFocusNum(int focusNum) {
        this.focusNum = focusNum;
    }

    public List<CommentVO> getCommentVOList() {
        return commentVOList;
    }

    public void setCommentVOList(List<CommentVO> commentVOList) {
        this.commentVOList = commentVOList;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }


    //==================================================

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getKind() {
        return kind;
    }

    public void setKind(Integer kind) {
        this.kind = kind;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image == null ? null : image.trim();
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope == null ? null : scope.trim();
    }

    public Integer getForm() {
        return form;
    }

    public void setForm(Integer form) {
        this.form = form;
    }

    public Integer getLeastCourseNum() {
        return leastCourseNum;
    }

    public void setLeastCourseNum(Integer leastCourseNum) {
        this.leastCourseNum = leastCourseNum;
    }

    public Integer getLeastPrice() {
        return leastPrice;
    }

    public void setLeastPrice(Integer leastPrice) {
        this.leastPrice = leastPrice;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getMaxPerson() {
        return maxPerson;
    }

    public void setMaxPerson(Integer maxPerson) {
        this.maxPerson = maxPerson;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date == null ? null : date.trim();
    }

    public Integer getTimeLen() {
        return timeLen;
    }

    public void setTimeLen(Integer timeLen) {
        this.timeLen = timeLen;
    }

    public String getTool() {
        return tool;
    }

    public void setTool(String tool) {
        this.tool = tool == null ? null : tool.trim();
    }

    public Integer getYoungOrOld() {
        return youngOrOld;
    }

    public void setYoungOrOld(Integer youngOrOld) {
        this.youngOrOld = youngOrOld;
    }

    public Integer getJoinNum() {
        return joinNum;
    }

    public void setJoinNum(Integer joinNum) {
        this.joinNum = joinNum;
    }

    public Integer getIsPublic() {
        return isPublic;
    }

    public void setIsPublic(Integer isPublic) {
        this.isPublic = isPublic;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel == null ? null : tel.trim();
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr == null ? null : addr.trim();
    }

    public String getTraffic() {
        return traffic;
    }

    public void setTraffic(String traffic) {
        this.traffic = traffic == null ? null : traffic.trim();
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getNotReadComment() {
        return notReadComment;
    }

    public void setNotReadComment(int notReadComment) {
        this.notReadComment = notReadComment;
    }

    public int getAnonymous() {
        return anonymous;
    }

    public boolean isPay() {
        return isPay;
    }

    public void setPay(boolean pay) {
        isPay = pay;
    }

    public void setAnonymous(int anonymous) {
        this.anonymous = anonymous;
    }

    public int getFocusSee() {
        return focusSee;
    }

    public void setFocusSee(int focusSee) {
        this.focusSee = focusSee;
    }

    public int getPaySee() {
        return paySee;
    }

    public void setPaySee(int paySee) {
        this.paySee = paySee;
    }

    public double getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(double payMoney) {
        this.payMoney = payMoney;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getMediaUrl() {
        return mediaUrl;
    }

    public void setMediaUrl(String mediaUrl) {
        this.mediaUrl = mediaUrl;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public List<Unit> getReplyList() {
        return replyList;
    }

    public void setReplyList(List<Unit> replyList) {
        this.replyList = replyList;
    }

    public int getViewNum() {
        return viewNum;
    }

    public void setViewNum(int viewNum) {
        this.viewNum = viewNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Unit unit = (Unit) o;

        if (id != null ? !id.equals(unit.id) : unit.id != null) return false;

        if (createdTime != null ? !createdTime.equals(unit.createdTime) : unit.createdTime != null) return false;
        return updateTime != null ? updateTime.equals(unit.updateTime) : unit.updateTime == null;
    }

    public int getMediaLength() {
        return mediaLength;
    }

    public void setMediaLength(int mediaLength) {
        this.mediaLength = mediaLength;
    }

    @Override
    public String toString() {
        return "Unit{" +
                "id=" + id +
                ", userId=" + userId +
                ", kind=" + kind +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", image='" + image + '\'' +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                ", name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", scope='" + scope + '\'' +
                ", form=" + form +
                ", leastCourseNum=" + leastCourseNum +
                ", leastPrice=" + leastPrice +
                ", price=" + price +
                ", maxPerson=" + maxPerson +
                ", date='" + date + '\'' +
                ", timeLen=" + timeLen +
                ", tool='" + tool + '\'' +
                ", youngOrOld=" + youngOrOld +
                ", joinNum=" + joinNum +
                ", isPublic=" + isPublic +
                ", tel='" + tel + '\'' +
                ", addr='" + addr + '\'' +
                ", traffic='" + traffic + '\'' +
                ", createdTime=" + createdTime +
                ", updateTime=" + updateTime +
                ", anonymous=" + anonymous +
                ", focusSee=" + focusSee +
                ", paySee=" + paySee +
                ", payMoney=" + payMoney +
                ", typeId=" + typeId +
                ", coverUrl='" + coverUrl + '\'' +
                ", fileId='" + fileId + '\'' +
                ", mediaUrl='" + mediaUrl + '\'' +
                ", viewNum=" + viewNum +
                ", parentId=" + parentId +
                ", mediaLength=" + mediaLength +
                ", sex=" + sex +
                ", headImgUrl='" + headImgUrl + '\'' +
                ", userName='" + userName + '\'' +
                ", status=" + status +
                ", notReadComment=" + notReadComment +
                ", commentVOList=" + commentVOList +
                ", replyList=" + replyList +
                ", loveNum=" + loveNum +
                ", isLove=" + isLove +
                ", isFocus=" + isFocus +
                ", focusNum=" + focusNum +
                '}';
    }
}